package cn.set;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/4/9 14:49
 */
public class TestSet {
    public static void main(String[] args) {
        Set<Integer> set = new ListSet<>();

        set.add(10);
        set.add(11);
        set.add(11);
        set.add(12);
        set.add(10);

        //set.clear();
        set.remove(10);
        boolean contains = set.contains(11);
        System.out.println(contains);
        System.out.println(set.isEmpty());

        System.out.println(set.size());

        System.out.println("-----------遍历--------------------");
        set.traversal(new Set.Visitor<Integer>() {
            @Override
            boolean visit(Integer element) {
                System.out.println(element);
                return false;
            }
        });
    }
}
